19 research outputs found

    Reusable Components of Semantic Specifications

    Get PDF
    Semantic specifications of programming languages typically have poor modularity. This hinders reuse of parts of the semantics of one language when specifying a different language – even when the two languages have many constructs in common – and evolution of a language may require major reformulation of its semantics. Such drawbacks have discouraged language developers from using formal semantics to document their designs. In the PLanCompS project, we have developed a component-based approach to semantics. Here, we explain its modularity aspects, and present an illustrative case study: a component-based semantics for Caml Light. We have tested the correctness of the semantics by running programs on an interpreter generated from the semantics, comparing the output with that produced on the standard implementation of the language. Our approach provides good modularity, facilitates reuse, and should support co-evolution of languages and their formal semantics. It could be particularly useful in connection with domain-specific languages and language-driven software development

    Executable component-based semantics

    Get PDF
    The potential benefits of formal semantics are well known. However, a substantial amount of work is required to produce a complete and accurate formal semantics for a major language; and when the language evolves, large-scale revision of the semantics may be needed to reflect the changes. The investment of effort needed to produce an initial definition, and subsequently to revise it, has discouraged language developers from using formal semantics. Consequently, many major programming languages (and most domain-specific languages) do not yet have formal semantic definitions.To improve the practicality of formal semantic definitions, the PLanCompS project has developed a component-based approach. In this approach, the semantics of a language is defined by translating its constructs (compositionally) to combinations of so-called fundamental constructs, or ‘funcons’. Each funcon is defined using a modular variant of Structural Operational Semantics, and forms a language-independent component that can be reused in definitions of different languages. A substantial library of funcons has been developed and tested in several case studies. Crucially, the definition of each funcon is fixed, and does not need changing when new funcons are added to the library.For specifying component-based semantics, we have designed and implemented a meta-language called CBS. It includes specification of abstract syntax, of its translation to funcons, and of the funcons themselves. Development of CBS specifications is supported by an integrated development environment. The accuracy of a language definition can be tested by executing the specified translation on programs written in the defined language, and then executing the resulting funcon terms using an interpreter generated from the CBS definitions of the funcons. This paper gives an introduction to CBS, illustrates its use, and presents the various tools involved in our implementation of CBS

    Изменение микроструктуры пружинного Сr-Ni сплава после старения

    Get PDF
    Установлено, что старение закаленного сплава 47ХНМ при температуре 500 °С в течение 5...10 ч не приводит к распаду пересыщенного твердого раствора, при повышении температуры старения до 600 °С начинают проявляться признаки распада в частицах ?-фазы гомогенного типа. Показано, что после старения при 700 °С закаленных образцов интенсивно развивается прерывистый распад с выделением некогерентной ?-фазы на основе хрома, причем объемная доля его возрастает с увеличением времени старения, достигая максимальных значений за 5...10 ч старения

    Towards meta-interpretive learning of programming language semantics

    Get PDF
    We introduce a new application for inductive logic programming: learning the semantics of programming languages from example evaluations. In this short paper, we explored a simplified task in this domain using the Metagol meta-interpretive learning system. We highlighted the challenging aspects of this scenario, including abstracting over function symbols, nonterminating examples, and learning non-observed predicates, and proposed extensions to Metagol helpful for overcoming these challenges, which may prove useful in other domains.Comment: ILP 2019, to appea

    Many-Valued Institutions for Constraint Specification

    Get PDF
    We advance a general technique for enriching logical systems with soft constraints, making them suitable for specifying complex software systems where parts are put together not just based on how they meet certain functional requirements but also on how they optimise certain constraints. This added expressive power is required, for example, for capturing quality attributes that need to be optimised or, more generally, for formalising what are usually called service-level agreements. More specifically, we show how institutions endowed with a graded semantic consequence can accommodate soft-constraint satisfaction problems. We illustrate our approach by showing how, in the context of service discovery, one can quantify the compatibility of two specifications and thus formalise the selection of the most promising provider of a required resource.Peer Reviewe

    ACTRESS: an Action Semantics Directed Compiler Generator

    No full text
    We report progress on the development of Actress, a compiler generator based on action semantics. It consists of a number of modules, written in SML, that can be composed to construct either an action notation compiler or a simple compiler generator. We also outline current and future developments that will improve the quality of the generated compilers. 1 Introduction We define a compiler generator to be a tool that constructs a compiler automatically, given a syntactic and semantic description of the source language. This definition emphasizes the fact that the compiler is not written by a programmer, but generated from a formal description of the language. Ideally, this formal description is one that was written by the language designer and is consulted by users of the language. We can generate an efficient syntactic analyser automatically from a syntactic description, using tools such as lex and yacc. However, generating a code generator from a semantic description is much more d..

    An agile approach to language modelling and development

    No full text
    We have developed novel techniques for component-based specification of programming languages. In our approach, the semantics of each fundamental programming construct is specified independently, using an inherently modular framework such that no reformulation is needed when constructs are combined. A language specification consists of an unrestricted context-free grammar for the syntax of programs, together with an analysis of each language construct in terms of fundamental constructs. An open-ended collection of fundamental constructs is currently being developed. When supported by appropriate tools, our techniques allow a more agile approach to the design, modelling, and implementation of programming and domain-specific languages. In particular, our approach encourages language designers to proceed incrementally, using prototype implementations generated from specifications to test tentative designs. The components of our specifications are independent and highly reusable, so initial language specifications can be rapidly produced, and can easily evolve in response to changing design decisions. In this paper, we outline our approach, and relate it to the practices and principles of agile modelling

    Verbfinala strukturer och OV-ledföljd i äldre svenska : En studie i syntaktisk förändring

    No full text
    I äldre svenska bisatser förekommer en rad ledföljdstyper som helt saknas i modernt språkbruk; dels satser där det finita verbet återfinns efter ett objekt och/eller ett infinit verb, s.k. verbfinala strukturer, dels övrig OV-ledföljd där objektet men inte det infinita verbet påträffas högre upp i satsen. Syftet med denna uppsats är att förklara hur och varför bruket av och grammatiken bakom dessa ledföljdstyper förändras i äldre svenska. Materialet består av 32 texter skrivna mellan ca 1290 och 1756 inom ett äldre svenskt språkområde. Ur dessa texter har 4178 bisatser excerperats och analyserats med hjälp av variationslingvistisk metod. Utifrån de empiriska undersökningarnas resultat och uppsatsens teoretiska ställningstaganden – en kombination av generativ grammtik och variationslingvistik – postuleras att det vid två tillfällen i svenskans OV-historia inträffar en förändring i grammatiskt system. Den första sker vid brytpunkten mellan äldre och yngre fornsvenska, då flera typer av nominalfrasobjekt med substantiviskt huvudord förlorar möjligheten att flytta till vänster om sitt huvudverb. Den andra inträffar troligen vid slutet av äldre nysvenska, då även övriga objekt erhåller flyttningsrestriktioner. Ledföljdsvariationen i äldre nysvenska texter beskrivs också som avhängig två distinkta system, vilka antas vara relaterade till formalitetsgrad. Flyttning av particip och infinita verb betraktas som karaktäristiskt för ett mer formellt system. En annan empirisk iakttagelse är att det över tid sker en frekvensförskjutning från OV-ledföljd som är gångbar oavsett satsnivå till bisatsspecifika och verbfinala strukturer. Detta betraktas emellertid inte som relaterat till själva OV-systemet, utan som en konsekvens av att det finita verbets position förändras. Under äldre fornsvensk tid flyttar en bisats finita verb nästan alltid från V° till I°, vilket osynliggör att objektet kan flytta till vänster om det finita verbets basposition i VP. Under yngre fornsvensk och äldre nysvensk tid försvinner flyttning av finit verb succesivt i äldre texter, och bisatsspecifika ledföljder blir således vanligare. Utvecklingen uppvisar också ett diakront samband med det händelseförlopp som traditionellt har associerats med förlusten av V-till-I-flyttning; framväxten av en modern svensk af-ledföljd i bisats

    Evaluation Logic

    No full text
    A new typed, higher-order logic is described which appears particularly well tted to reasoning about forms of computation whose operational behaviour can be speci ed using the Natural Semantics style of structural operational semantics [5]. The logic's underlying type system is Moggi's computational metalanguage [11], which enforces a distinction between computations and values via the categorical structure of a strong monad. This is extended to a (constructive) predicate logic with modal formulas about evaluation of computations to values, called evaluation modalities. The categorical structure corresponding to this kind of logic is explained and a couple of examples of categorical models given. As a rst example of the naturalness and applicability of this new logic to program semantics, we investigate the translation of a (tiny) fragment of Standard ML into a theory over the logic, which is proved computationally adequate for ML's Natural Semantics [10]. Whilst it is tiny, the ML fragment does however contain both higher-order functional and imperative features, about which the logic allows us to reason without having to mention global states explicitly
    corecore